<template>
  <div class="mian-box">
    <cesium-map @viewer="getViewer"></cesium-map>
  </div>
</template>

<script>
import CesiumMap from "../../../components/map/cesium-map";
// 定义全局变量,没有放到data里边是为了解决数据vue的数据拦截
let zMap3d = null;
export default {
  data() {
    return {};
  },
  components: {
    CesiumMap
  },
  mounted() {
    // console.log(cMap);
    // var Cesium = this.Cesium;
    // var point = {
    //   position: Cesium.Cartesian3.fromDegrees(113.2, 34.5),
    //   name: "Red ellipse on surface",
    //   point: {
    //     pixelSize: 10,
    //     color: Cesium.Color.BLUE.withAlpha(0.5),
    //     outlineColor: Cesium.Color.RED,
    //     outlineWidth: 2
    //   }
    // };
    // cMap.entities.add(point);
  },
  methods:{
    getViewer(map){
      zMap3d = map;
    }
  }
};
</script>

<style scoped>
.mian-box{
  height: 100%;
}
</style>